
#include "Flyweight.h"


Flyweight::Flyweight()
{
}

Flyweight::Flyweight(const Flyweight& that)
{
	iEmitterType = that.iEmitterType;
	iEmitterWidth = that.iEmitterWidth;
	iEmitterHeight = that.iEmitterHeight;
	iEmitterRange = that.iEmitterRange;
	fAngle = that.fAngle;
	fMinLife = that.fMinLife;
	fMaxLife = that.fMaxLife;
	fStartColorA = that.fStartColorA;
	fStartColorR = that.fStartColorR;
	fStartColorG = that.fStartColorG;
	fStartColorB = that.fStartColorB;
	fEndColorA = that.fEndColorA;
	fEndColorR = that.fEndColorR;
	fEndColorG = that.fEndColorG;
	fEndColorB = that.fEndColorB;
	fSpeedStart = that.fSpeedStart;
	fSpeedEnd = that.fSpeedEnd;
	fScaleStart = that.fScaleStart;
	fScaleEnd = that.fScaleEnd;
	fRotationChangePerSec = that.fRotationChangePerSec;
	fWeight = that.fWeight;
	bGravity = that.bGravity;
	bWind = that.bWind;
	position = that.position;
	drawRect = that.drawRect;
	centerPoint = that.centerPoint;
	velocityStart = that.velocityStart;
	velocityEnd = that.velocityEnd;
	image = that.image;
}

Flyweight& Flyweight::operator=(const Flyweight& that)
{
	iEmitterType = that.iEmitterType;
	iEmitterWidth = that.iEmitterWidth;
	iEmitterHeight = that.iEmitterHeight;
	iEmitterRange = that.iEmitterRange;
	fAngle = that.fAngle;
	fMinLife = that.fMinLife;
	fMaxLife = that.fMaxLife;
	fStartColorA = that.fStartColorA;
	fStartColorR = that.fStartColorR;
	fStartColorG = that.fStartColorG;
	fStartColorB = that.fStartColorB;
	fEndColorA = that.fEndColorA;
	fEndColorR = that.fEndColorR;
	fEndColorG = that.fEndColorG;
	fEndColorB = that.fEndColorB;
	fSpeedStart = that.fSpeedStart;
	fSpeedEnd = that.fSpeedEnd;
	fScaleStart = that.fScaleStart;
	fScaleEnd = that.fScaleEnd;
	fRotationChangePerSec = that.fRotationChangePerSec;
	fWeight = that.fWeight;
	bGravity = that.bGravity;
	bWind = that.bWind;
	position = that.position;
	drawRect = that.drawRect;
	centerPoint = that.centerPoint;
	velocityStart = that.velocityStart;
	velocityEnd = that.velocityEnd;
	image = that.image;
	return *this;
}

Flyweight::~Flyweight()
{
}

// Accessors
int Flyweight::GetEmitterType()
{
	return iEmitterType;
}

int Flyweight::GetEmitterWidth()
{
	return iEmitterWidth;
}

int Flyweight::GetEmitterHeight()
{
	return iEmitterHeight;
}

int Flyweight::GetEmitterRange()
{
	return iEmitterRange;
}

float Flyweight::GetAngle()
{
	return fAngle;
}

float Flyweight::GetMinLife()
{
	return fMinLife;
}

float Flyweight::GetMaxLife()
{
	return fMaxLife;
}

float Flyweight::GetStartColorA()
{
	return fStartColorA;
}

float Flyweight::GetStartColorR()
{
	return fStartColorR;
}

float Flyweight::GetStartColorG()
{
	return fStartColorG;
}

float Flyweight::GetStartColorB()
{
	return fStartColorB;
}

float Flyweight::GetEndColorA()
{
	return fEndColorA;
}

float Flyweight::GetEndColorR()
{
	return fEndColorR;
}

float Flyweight::GetEndColorG()
{
	return fEndColorG;
}

float Flyweight::GetEndColorB()
{
	return fEndColorB;
}

float Flyweight::GetStartSpeed()
{
	return fSpeedStart;
}

float Flyweight::GetEndSpeed()
{
	return fSpeedEnd;
}

float Flyweight::GetStartScale()
{
	return fScaleStart;
}

float Flyweight::GetEndScale()
{
	return fScaleEnd;
}

float Flyweight::GetRotationRate()
{
	return fRotationChangePerSec;
}

float Flyweight::GetWeight()
{
	return fWeight;
}

bool Flyweight::GetGravity()
{
	return bGravity;
}

bool Flyweight::GetWind()
{
	return bWind;
}

SGD::Point Flyweight::GetPosition()
{
	return position;
}

SGD::Rectangle Flyweight::GetDrawRect()
{
	return drawRect;
}

SGD::Vector Flyweight::GetCenterPoint()
{
	return centerPoint;
}

SGD::Vector Flyweight::GetStartVelocity()
{
	return velocityStart;
}

SGD::Vector Flyweight::GetEndVelocity()
{
	return velocityEnd;
}

SGD::HTexture Flyweight::GetImage()
{
	return image;
}

// Mutators
void Flyweight::SetEmitterType(int type)
{
	iEmitterType = type;
}

void Flyweight::SetEmitterWidth(int width)
{
	iEmitterWidth = width;
}

void Flyweight::SetEmitterHeight(int height)
{
	iEmitterHeight = height;
}

void Flyweight::SetEmitterRange(int range)
{
	iEmitterRange = range;
}

void Flyweight::SetAngle(float angle)
{
	fAngle = angle;
}

void Flyweight::SetMinLife(float life)
{
	fMinLife = life;
}

void Flyweight::SetMaxLife(float life)
{
	fMaxLife = life;
}

void Flyweight::SetStartColorA(float color)
{
	fStartColorA = color;
}

void Flyweight::SetStartColorR(float color)
{
	fStartColorR = color;
}

void Flyweight::SetStartColorG(float color)
{
	fStartColorG = color;
}

void Flyweight::SetStartColorB(float color)
{
	fStartColorB = color;
}

void Flyweight::SetEndColorA(float color)
{
	fEndColorA = color;
}

void Flyweight::SetEndColorR(float color)
{
	fEndColorR = color;
}

void Flyweight::SetEndColorG(float color)
{
	fEndColorG = color;
}

void Flyweight::SetEndColorB(float color)
{
	fEndColorB = color;
}

void Flyweight::SetStartSpeed(float speed)
{
	fSpeedStart = speed;
}

void Flyweight::SetEndSpeed(float speed)
{
	fSpeedEnd = speed;
}

void Flyweight::SetStartScale(float scale)
{
	fScaleStart = scale;
}

void Flyweight::SetEndScale(float scale)
{
	fScaleEnd = scale;
}

void Flyweight::SetRotationRate(float rotation)
{
	fRotationChangePerSec = rotation;
}

void Flyweight::SetWeight(float weight)
{
	fWeight = weight;
}

void Flyweight::SetGravity(bool gravity)
{
	bGravity = gravity;
}

void Flyweight::SetWind(bool wind)
{
	bWind = wind;
}

void Flyweight::SetPosition(SGD::Point point)
{
	position = point;
}

void Flyweight::SetDrawRect(SGD::Rectangle rect)
{
	drawRect = rect;
}

void Flyweight::SetDrawRect(float left, float top, float right, float bottom)
{
	drawRect.left = left;
	drawRect.top = top;
	drawRect.right = right;
	drawRect.bottom = bottom;
}

void Flyweight::SetCenterPoint(SGD::Vector point)
{
	centerPoint = point;
}

void Flyweight::SetStartVelocity(SGD::Vector velocity)
{
	velocityStart = velocity;
}

void Flyweight::SetEndVelocity(SGD::Vector velocity)
{
	velocityEnd = velocity;
}

void Flyweight::SetImage(SGD::HTexture img)
{
	image = img;
}